<?php
class AboutController extends CController {
	public function actionIndex() {
		$categoryIds = array(33);
		$posts = array();
		foreach($categoryIds as $k => $v) {
			$posts[$k] = Posts::model()->published()->findByCategoryId($v);
		}

		$postId = isset($_GET['id']) ? (int)$_GET['id'] : null;
		$postId = $postId !== null ? $postId : 29; 
		$post = Posts::model()->published()->findByPk($postId);

		$this->setPageTitle('关于慧苑 - 广州心理咨询网');
		$this->render('view', array('posts' => $posts, 'post' => $post));
	}
	
	public function actionBaiduMap() {
		$this->renderPartial('baidu-map');
	}
}
